const express = require('express');
var router = express.Router();
const orderCtrl = require('../controllers/order.server.controller');



router.route('/orders')
    .get(orderCtrl.findUserOrders);

router.route('/order')
    .post(orderCtrl.addOrder)//生成订单，生成订单同时要更新商家订单数

router.route('/order/:_id')
    .get(orderCtrl.findOrderById)
    .put(orderCtrl.putOrder);//更改某订单状态与更改订单投诉内容并发JMS

router.route('/complaint')
    .get(orderCtrl.getComplaintResult);//获取订单投诉状态，后台需要到A端获取投诉状态A端URL:/client/complaint?oid=xxx


module.exports = router;